/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
@Entity
@Table(name = "tbl_tipopromocao")
@SequenceGenerator(name="seq_tipopromocao",sequenceName="seq_tipopromocao",allocationSize=1)
public class Tipopromocao implements Serializable{
    
    //@OneToMany(mappedBy = "tipopromocao_id")
    @OneToMany(mappedBy = "promocoes_id")
    private List<Promocoes> promocoess;
    @Id
    private int tipopromocao_id;
    private String descricao;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date datainicial;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date datafinal;
    private Double percdesconto; 

    public Tipopromocao() {
    }

    public List<Promocoes> getPromocoess() {
        return promocoess;
    }

    public void setPromocoess(List<Promocoes> promocoess) {
        this.promocoess = promocoess;
    }

    public int getTipopromocao_id() {
        return tipopromocao_id;
    }

    public void setTipopromocao_id(int tipopromocao_id) {
        this.tipopromocao_id = tipopromocao_id;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Date getDatainicial() {
        return datainicial;
    }

    public void setDatainicial(Date datainicial) {
        this.datainicial = datainicial;
    }

    public Date getDatafinal() {
        return datafinal;
    }

    public void setDatafinal(Date datafinal) {
        this.datafinal = datafinal;
    }

    public Double getPercdesconto() {
        return percdesconto;
    }

    public void setPercdesconto(Double percdesconto) {
        this.percdesconto = percdesconto;
    }

    public Tipopromocao(int tipopromocao_id, String descricao, Date datainicial, Date datafinal, Double percdesconto) {
        this.tipopromocao_id = tipopromocao_id;
        this.descricao = descricao;
        this.datainicial = datainicial;
        this.datafinal = datafinal;
        this.percdesconto = percdesconto;
    }
    
    
}
